package com.wzcl.app.controller;


import com.wzcl.app.model.common.RVO;
import com.wzcl.app.model.vo.SysDictVo;
import com.wzcl.app.service.SysDictService;
import io.swagger.annotations.Api;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;


@Log4j2
@RestController
@RequestMapping("/sysDict")
@Api(value = "固定值字典controller", tags = {"固定值字典相关接口"})
public class SysDictController{

    @Resource
    private SysDictService service;

    @GetMapping("/getGroup/{groupName}")
    public RVO<SysDictVo> getFile(@PathVariable String groupName) {
        return RVO.success(service.getSysDictByKeyName(groupName));
    }
}
